home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / x2ftp / msdos / libs / knowhow4 / ceditl.cpp < prev    next >
C/C++ Source or Header  |  1994-10-10  |  942b  |  38 lines

  1. #include "ceditl.h"
  2. #include "patterns.h"
  3. #include "khbgi.h"
  4.  
  5. void CaptureEditLine::show()
  6.     {
  7.     rect r = bound();
  8.     int bc = r.corner.X;
  9.     int txtlen = textwidth(header);
  10.     switch(where)
  11.     {
  12.     case C_RIGHT:
  13.         r.corner.X += txtlen;
  14.         settextjustify(LEFT_TEXT, CENTER_TEXT);
  15.         break;
  16.     case C_TOP:
  17.         r.origin.Y -= pScreenSet->cell_height;
  18.         settextjustify(CENTER_TEXT, TOP_TEXT);
  19.         break;
  20.     case C_BOTTOM:
  21.         r.corner.Y += pScreenSet->cell_height;
  22.         settextjustify(CENTER_TEXT, BOTTOM_TEXT);
  23.         break;
  24.     }
  25.  
  26.     if(header[0] != '\0')
  27.     {
  28.     bar(r, pColorSet->colors.HDR_BAK_COLOR,
  29.         pColorSet->colors.FILL_COLOR,
  30.         (uchar*)::pattern[hdr_pat]);
  31.     loc txtpos = (where == C_TOP) ?
  32.         loc(r.origin.X + r.width() / 2, r.origin.Y + 2)
  33.         : loc(bc, r.origin.Y + r.height() / 2);
  34.     setcolor(pColorSet->colors.ATTR_COLOR);
  35.     outtextat(txtpos, header);
  36.     }
  37.     EditLine::show();
  38.     }